SlideShare a Scribd company logo
1 of 3
Download to read offline
-        ...................................................................................                                                                         19                 2553

                                                                                                                                               F

                                                                                                                   F                   printf()    scanf()

                    printf() F F
                     F      F          F                                                                                                               F        F
                        F      F printf()
         printf(control string,argument list);
              control string                                                                F   F                   (format code)                                    (control code)
             F F F                                                                         (") F argument list                          F                                     F
                                                                                       F              F       F 1 F F F             F                                           F (,)
                                                                              (format code)                                   F                                      F                  F
     F                                                                                           F                                F       F                         printf()          F
               %              F                                                                     (conversion code)                 F



                                                                                                    F
    %c                                        F                                             F                              1(single character)
    %d , %i                       F                                                     F                               (integer int ) 1
    %e , %E                                       F                                                             (floating point ,float)      e F 2.15e+2                    F 215
    %f                                                        F           F          float                  double
    %g , %G                                                       F        F float
    %h                                    F                               short integer
    %o( )                                                             F     integer
    %x , %X                                                       F         integer                                        (%x                     F       %X                F      )
                                                                                                                                                                                    F
    %s                                                F                      F
    %u                                    F                                                                 (integer           int )       F
    %%                                                    F                                             %
    %p                                F                                       address                                  F        F
-       ...................................................................................                                                                                                                                             19                           2553

                         scanf() F                               F
                          F             F        F                                                       F                                   F F F                                    F           F                             F                        F
F                                                        F                                                                               F
            scanf(control string ,variable list);
            control string                                                                                               F                                    F                                                   F         F
               F                            F                        F                               F                                                F                       F           F                                                      F                   F

            variable list                                                                                                        F                F                                                           F                                      F
             F                                                                                                               F                                    F                                                                 F
        F                                                                    F                               F                                F                                                       F (,)                                                                     F
                   F              F F            F     F                                                                                                                  F                   F                                         &                    F
        F            F   (string) F
            scanf("%d %f %s",&i1,&f1,word);
                F F                F3 F     F                                                                                                                                                                          F                F
          F            F                  i1 , f1 word
            F                   F       F      F         F                                                                                                                                               enter                                                   F
              F           F           F   F scanf()

                                                                                                                                                                                  F
                     %c                                                                      F                                       ( character)
                     %d                                                              F
                     %e                                                                      F                                 ( floating point)
                   %f %lf                                                                                                 float double
                     %g                                      F           F                                           float
                     %h                                                              F                                 short integer
                     %l                                                          F                                      integer             8                                     10                                  16
                     %o                                                              F                                  integer           8 F
                     %u                                                                  F                              unsigned integer                                          10 F
                     %x                                                              F                                  integer           16 F
                     %s                                                                          F                      F        (string)
                                                     F                                                           F                   F                    F           F                                                FF
-      ...................................................................................               19   2553


                                                                                                 F
F                                 F                                          printf()                F   F

                     1

    #include <stdio.h>
    main()
    {
    printf( nWelcome. This Programn );
    printf( This is test write C programming );
    printf( by student name suwitn );
    printf( thank you );
    }




                      2

        #include <stdio.h>
        main()
        {
               int a,b,c;
               int total = 0;
               a = 10;
               b = 20;
               c = 15;
               printf( This is a+b+c = %d n ,a+b+c);
               printf( End );
        }

More Related Content

What's hot

06โมเมนตัมและการดล
06โมเมนตัมและการดล06โมเมนตัมและการดล
06โมเมนตัมและการดล
Doc Edu
 
07การเคลื่อนที่แบบหมุน
07การเคลื่อนที่แบบหมุน07การเคลื่อนที่แบบหมุน
07การเคลื่อนที่แบบหมุน
Doc Edu
 
Personality test
Personality testPersonality test
Personality test
pooyu
 
13 แสง
13 แสง13 แสง
13 แสง
topofzeed
 
20ฟิสิกส์นิวเคลียร์
20ฟิสิกส์นิวเคลียร์20ฟิสิกส์นิวเคลียร์
20ฟิสิกส์นิวเคลียร์
Doc Edu
 
11คลื่นกล
11คลื่นกล11คลื่นกล
11คลื่นกล
Doc Edu
 
12เสียง
12เสียง12เสียง
12เสียง
Doc Edu
 
05งานและพลังงาน
05งานและพลังงาน05งานและพลังงาน
05งานและพลังงาน
Doc Edu
 
ใบความรู้ที่ 6-5 ฟังก์ชัน If, If-Else
ใบความรู้ที่ 6-5 ฟังก์ชัน If, If-Elseใบความรู้ที่ 6-5 ฟังก์ชัน If, If-Else
ใบความรู้ที่ 6-5 ฟังก์ชัน If, If-Else
Nattapon
 
1 โลกและการเปลี่ยนแปลง
1 โลกและการเปลี่ยนแปลง1 โลกและการเปลี่ยนแปลง
1 โลกและการเปลี่ยนแปลง
muang82
 
10ความร้อน
10ความร้อน10ความร้อน
10ความร้อน
Doc Edu
 
Chemical management procedure [th]
Chemical management procedure [th]Chemical management procedure [th]
Chemical management procedure [th]
Adisorn Tanprasert
 
09ของไหล
09ของไหล09ของไหล
09ของไหล
Doc Edu
 
17ไฟฟ้าและแม่เหล็ก2
17ไฟฟ้าและแม่เหล็ก217ไฟฟ้าและแม่เหล็ก2
17ไฟฟ้าและแม่เหล็ก2
Doc Edu
 

What's hot (15)

06โมเมนตัมและการดล
06โมเมนตัมและการดล06โมเมนตัมและการดล
06โมเมนตัมและการดล
 
07การเคลื่อนที่แบบหมุน
07การเคลื่อนที่แบบหมุน07การเคลื่อนที่แบบหมุน
07การเคลื่อนที่แบบหมุน
 
Personality test
Personality testPersonality test
Personality test
 
13 แสง
13 แสง13 แสง
13 แสง
 
20ฟิสิกส์นิวเคลียร์
20ฟิสิกส์นิวเคลียร์20ฟิสิกส์นิวเคลียร์
20ฟิสิกส์นิวเคลียร์
 
11คลื่นกล
11คลื่นกล11คลื่นกล
11คลื่นกล
 
12เสียง
12เสียง12เสียง
12เสียง
 
05งานและพลังงาน
05งานและพลังงาน05งานและพลังงาน
05งานและพลังงาน
 
ใบความรู้ที่ 6-5 ฟังก์ชัน If, If-Else
ใบความรู้ที่ 6-5 ฟังก์ชัน If, If-Elseใบความรู้ที่ 6-5 ฟังก์ชัน If, If-Else
ใบความรู้ที่ 6-5 ฟังก์ชัน If, If-Else
 
1 โลกและการเปลี่ยนแปลง
1 โลกและการเปลี่ยนแปลง1 โลกและการเปลี่ยนแปลง
1 โลกและการเปลี่ยนแปลง
 
10ความร้อน
10ความร้อน10ความร้อน
10ความร้อน
 
Chemical management procedure [th]
Chemical management procedure [th]Chemical management procedure [th]
Chemical management procedure [th]
 
09ของไหล
09ของไหล09ของไหล
09ของไหล
 
Himayah_Icecream
Himayah_IcecreamHimayah_Icecream
Himayah_Icecream
 
17ไฟฟ้าและแม่เหล็ก2
17ไฟฟ้าและแม่เหล็ก217ไฟฟ้าและแม่เหล็ก2
17ไฟฟ้าและแม่เหล็ก2
 

Similar to ใบความรู้เรื่องคำสั่ง Printf scanf

บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
บทที่ 6 1 ฟังก์ชัน printf scanf [slide]บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
Nattapon
 
Microsoft word เกมบิงโกสัตว์
Microsoft word   เกมบิงโกสัตว์Microsoft word   เกมบิงโกสัตว์
Microsoft word เกมบิงโกสัตว์
Thanyamon Chat.
 
7 การเคลื่อนที่แบบหมุน
7 การเคลื่อนที่แบบหมุน7 การเคลื่อนที่แบบหมุน
7 การเคลื่อนที่แบบหมุน
topofzeed
 
หน่วยที่ 1 บทนำ
หน่วยที่ 1 บทนำหน่วยที่ 1 บทนำ
หน่วยที่ 1 บทนำ
krusarawut
 
Lesson 1 Intro
Lesson 1 IntroLesson 1 Intro
Lesson 1 Intro
krusarawut
 
20 ฟิสิกส์นิวเคลียร์
20 ฟิสิกส์นิวเคลียร์20 ฟิสิกส์นิวเคลียร์
20 ฟิสิกส์นิวเคลียร์
topofzeed
 
นิเวศวิทยา(Hand out)
นิเวศวิทยา(Hand out)นิเวศวิทยา(Hand out)
นิเวศวิทยา(Hand out)
Thanyamon Chat.
 
ตรรกศาสตร์เบื้องต้น
ตรรกศาสตร์เบื้องต้นตรรกศาสตร์เบื้องต้น
ตรรกศาสตร์เบื้องต้น
wanwilai
 
นิเวศวิทยา
นิเวศวิทยานิเวศวิทยา
นิเวศวิทยา
Thanyamon Chat.
 
เขียนโปรแกรมใช้คำสั่ง Printf scanf
เขียนโปรแกรมใช้คำสั่ง  Printf scanfเขียนโปรแกรมใช้คำสั่ง  Printf scanf
เขียนโปรแกรมใช้คำสั่ง Printf scanf
ธงชัย พาศรี
 
ธรรมชาติของสิ่งมีชีวิต
ธรรมชาติของสิ่งมีชีวิตธรรมชาติของสิ่งมีชีวิต
ธรรมชาติของสิ่งมีชีวิต
Thanyamon Chat.
 
ใบความรู้ที่ 6-6 ฟังก์ชัน Loop
ใบความรู้ที่ 6-6 ฟังก์ชัน Loopใบความรู้ที่ 6-6 ฟังก์ชัน Loop
ใบความรู้ที่ 6-6 ฟังก์ชัน Loop
Nattapon
 
3 แรง มวล และกฎการเคลื่อนที่
3 แรง มวล และกฎการเคลื่อนที่3 แรง มวล และกฎการเคลื่อนที่
3 แรง มวล และกฎการเคลื่อนที่
topofzeed
 
3 แรง มวล และกฎการเคลื่อนที่
3 แรง มวล และกฎการเคลื่อนที่3 แรง มวล และกฎการเคลื่อนที่
3 แรง มวล และกฎการเคลื่อนที่
topofzeed
 

Similar to ใบความรู้เรื่องคำสั่ง Printf scanf (20)

บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
บทที่ 6 1 ฟังก์ชัน printf scanf [slide]บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
บทที่ 6 1 ฟังก์ชัน printf scanf [slide]
 
Microsoft word เกมบิงโกสัตว์
Microsoft word   เกมบิงโกสัตว์Microsoft word   เกมบิงโกสัตว์
Microsoft word เกมบิงโกสัตว์
 
7 การเคลื่อนที่แบบหมุน
7 การเคลื่อนที่แบบหมุน7 การเคลื่อนที่แบบหมุน
7 การเคลื่อนที่แบบหมุน
 
หน่วยที่ 1 บทนำ
หน่วยที่ 1 บทนำหน่วยที่ 1 บทนำ
หน่วยที่ 1 บทนำ
 
Lesson 1 Intro
Lesson 1 IntroLesson 1 Intro
Lesson 1 Intro
 
20 ฟิสิกส์นิวเคลียร์
20 ฟิสิกส์นิวเคลียร์20 ฟิสิกส์นิวเคลียร์
20 ฟิสิกส์นิวเคลียร์
 
นิเวศวิทยา(Hand out)
นิเวศวิทยา(Hand out)นิเวศวิทยา(Hand out)
นิเวศวิทยา(Hand out)
 
ตรรกศาสตร์เบื้องต้น
ตรรกศาสตร์เบื้องต้นตรรกศาสตร์เบื้องต้น
ตรรกศาสตร์เบื้องต้น
 
นิเวศวิทยา
นิเวศวิทยานิเวศวิทยา
นิเวศวิทยา
 
industrial Technology Assistance Program: iTAP
industrial Technology Assistance Program: iTAPindustrial Technology Assistance Program: iTAP
industrial Technology Assistance Program: iTAP
 
เขียนโปรแกรมใช้คำสั่ง Printf scanf
เขียนโปรแกรมใช้คำสั่ง  Printf scanfเขียนโปรแกรมใช้คำสั่ง  Printf scanf
เขียนโปรแกรมใช้คำสั่ง Printf scanf
 
ธรรมชาติของสิ่งมีชีวิต
ธรรมชาติของสิ่งมีชีวิตธรรมชาติของสิ่งมีชีวิต
ธรรมชาติของสิ่งมีชีวิต
 
Brief create list-km090354
Brief create list-km090354Brief create list-km090354
Brief create list-km090354
 
Index with Word 2007
Index with Word 2007Index with Word 2007
Index with Word 2007
 
ใบความรู้ที่ 6-6 ฟังก์ชัน Loop
ใบความรู้ที่ 6-6 ฟังก์ชัน Loopใบความรู้ที่ 6-6 ฟังก์ชัน Loop
ใบความรู้ที่ 6-6 ฟังก์ชัน Loop
 
รูปแบบหนังสือราชการ
รูปแบบหนังสือราชการ รูปแบบหนังสือราชการ
รูปแบบหนังสือราชการ
 
Ch11 International Finance
Ch11 International FinanceCh11 International Finance
Ch11 International Finance
 
Pdf114
Pdf114Pdf114
Pdf114
 
3 แรง มวล และกฎการเคลื่อนที่
3 แรง มวล และกฎการเคลื่อนที่3 แรง มวล และกฎการเคลื่อนที่
3 แรง มวล และกฎการเคลื่อนที่
 
3 แรง มวล และกฎการเคลื่อนที่
3 แรง มวล และกฎการเคลื่อนที่3 แรง มวล และกฎการเคลื่อนที่
3 แรง มวล และกฎการเคลื่อนที่
 

More from ธงชัย พาศรี

ใบงานเรื่องการคอมไพล์โปรแกรม
ใบงานเรื่องการคอมไพล์โปรแกรมใบงานเรื่องการคอมไพล์โปรแกรม
ใบงานเรื่องการคอมไพล์โปรแกรม
ธงชัย พาศรี
 
การวิเคราะห์ปัญหา(080653)
การวิเคราะห์ปัญหา(080653)การวิเคราะห์ปัญหา(080653)
การวิเคราะห์ปัญหา(080653)
ธงชัย พาศรี
 
การเขียนผังงานแบบทำซ้ำ (080753)
การเขียนผังงานแบบทำซ้ำ  (080753)การเขียนผังงานแบบทำซ้ำ  (080753)
การเขียนผังงานแบบทำซ้ำ (080753)
ธงชัย พาศรี
 
การเขียนผังงานแบบทางเลือก (050753)
การเขียนผังงานแบบทางเลือก  (050753)การเขียนผังงานแบบทางเลือก  (050753)
การเขียนผังงานแบบทางเลือก (050753)
ธงชัย พาศรี
 
การเขียนผังงานแบบทางเลือก (010753)
การเขียนผังงานแบบทางเลือก  (010753)การเขียนผังงานแบบทางเลือก  (010753)
การเขียนผังงานแบบทางเลือก (010753)
ธงชัย พาศรี
 
การเขียนผังงานแบบทางเลือก (050753)
การเขียนผังงานแบบทางเลือก  (050753)การเขียนผังงานแบบทางเลือก  (050753)
การเขียนผังงานแบบทางเลือก (050753)
ธงชัย พาศรี
 
การเขียนผังงานแบบทางเลือก (010753)
การเขียนผังงานแบบทางเลือก  (010753)การเขียนผังงานแบบทางเลือก  (010753)
การเขียนผังงานแบบทางเลือก (010753)
ธงชัย พาศรี
 

More from ธงชัย พาศรี (10)

ใบงานเรื่องการคอมไพล์โปรแกรม
ใบงานเรื่องการคอมไพล์โปรแกรมใบงานเรื่องการคอมไพล์โปรแกรม
ใบงานเรื่องการคอมไพล์โปรแกรม
 
การวิเคราะห์ปัญหา(080653)
การวิเคราะห์ปัญหา(080653)การวิเคราะห์ปัญหา(080653)
การวิเคราะห์ปัญหา(080653)
 
การเขียนผังงานแบบทำซ้ำ (080753)
การเขียนผังงานแบบทำซ้ำ  (080753)การเขียนผังงานแบบทำซ้ำ  (080753)
การเขียนผังงานแบบทำซ้ำ (080753)
 
การเขียนผังงานแบบทางเลือก (050753)
การเขียนผังงานแบบทางเลือก  (050753)การเขียนผังงานแบบทางเลือก  (050753)
การเขียนผังงานแบบทางเลือก (050753)
 
การเขียนผังงานแบบทางเลือก (010753)
การเขียนผังงานแบบทางเลือก  (010753)การเขียนผังงานแบบทางเลือก  (010753)
การเขียนผังงานแบบทางเลือก (010753)
 
การเขียนผังงาน (290653)
การเขียนผังงาน (290653)การเขียนผังงาน (290653)
การเขียนผังงาน (290653)
 
การเขียนผังงาน (280653)
การเขียนผังงาน (280653)การเขียนผังงาน (280653)
การเขียนผังงาน (280653)
 
การเขียนผังงานแบบทางเลือก (050753)
การเขียนผังงานแบบทางเลือก  (050753)การเขียนผังงานแบบทางเลือก  (050753)
การเขียนผังงานแบบทางเลือก (050753)
 
การเขียนผังงานแบบทางเลือก (010753)
การเขียนผังงานแบบทางเลือก  (010753)การเขียนผังงานแบบทางเลือก  (010753)
การเขียนผังงานแบบทางเลือก (010753)
 
การเขียนผังงาน (290653)
การเขียนผังงาน (290653)การเขียนผังงาน (290653)
การเขียนผังงาน (290653)
 

Recently uploaded

Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
AnaAcapella
 

Recently uploaded (20)

COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in  Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in Uttam Nagar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Tatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf artsTatlong Kwento ni Lola basyang-1.pdf arts
Tatlong Kwento ni Lola basyang-1.pdf arts
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 

ใบความรู้เรื่องคำสั่ง Printf scanf

  • 1. - ................................................................................... 19 2553 F F printf() scanf() printf() F F F F F F F F F printf() printf(control string,argument list); control string F F (format code) (control code) F F F (") F argument list F F F F F 1 F F F F F (,) (format code) F F F F F F F printf() F % F (conversion code) F F %c F F 1(single character) %d , %i F F (integer int ) 1 %e , %E F (floating point ,float) e F 2.15e+2 F 215 %f F F float double %g , %G F F float %h F short integer %o( ) F integer %x , %X F integer (%x F %X F ) F %s F F %u F (integer int ) F %% F % %p F address F F
  • 2. - ................................................................................... 19 2553 scanf() F F F F F F F F F F F F F F F F scanf(control string ,variable list); control string F F F F F F F F F F F F F variable list F F F F F F F F F F F F F (,) F F F F F F F F & F F F (string) F scanf("%d %f %s",&i1,&f1,word); F F F3 F F F F F F i1 , f1 word F F F F F enter F F F F F scanf() F %c F ( character) %d F %e F ( floating point) %f %lf float double %g F F float %h F short integer %l F integer 8 10 16 %o F integer 8 F %u F unsigned integer 10 F %x F integer 16 F %s F F (string) F F F F F FF
  • 3. - ................................................................................... 19 2553 F F F printf() F F 1 #include <stdio.h> main() { printf( nWelcome. This Programn ); printf( This is test write C programming ); printf( by student name suwitn ); printf( thank you ); } 2 #include <stdio.h> main() { int a,b,c; int total = 0; a = 10; b = 20; c = 15; printf( This is a+b+c = %d n ,a+b+c); printf( End ); }